package com.banmoon.factory.abs;

import com.banmoon.factory.noodle.BeefNoodle;
import com.banmoon.factory.noodle.EggNoodle;
import com.banmoon.factory.noodle.MeatSauceNoodle;
import com.banmoon.factory.noodle.Noodle;
import com.banmoon.factory.soup.EggDropSoup;
import com.banmoon.factory.soup.FishSoup;
import com.banmoon.factory.soup.Soup;

public class GZShopFactory implements AbstractFactory{

    @Override
    public Noodle createNoodle(int type) {
        Noodle noodle = null;
        if(type==1001)
            noodle = new BeefNoodle();
        else if(type==1002)
            noodle = new EggNoodle();
        else if(type==1003)
            noodle = new MeatSauceNoodle();

        if(noodle==null)
            System.out.println("未知的面食");
        else
            noodle.setArea("广州");
        return noodle;

    }

    @Override
    public Soup createSoup(int type) {
        Soup soup = null;
        if(type==2001)
            soup = new EggDropSoup();
        else if(type==2002)
            soup = new FishSoup();

        if(soup==null)
            System.out.println("未知的汤");
        else
            soup.setArea("广州");
        return soup;
    }
}
